import java.util.Scanner;

public class Job5 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = 1;
        int b = 1;
        int c;
        int d;
        System.out.println("请输入斐波拉切数列的项数：");
        int i = in.nextInt();
        if (i == 1) {
            System.out.print(a + " ");
        }
        if (i == 2) {
            System.out.print(a + " ");
            System.out.print(b + " ");
        }
        if (i >= 3) {
            System.out.print(a + " ");
            System.out.print(b + " ");
            for( d = 1; d <= i - 2; d++) {
                c = a + b;
                System.out.print(c + " ");
                a = b;
                b = c;
            }
        }
    }
}
